gate question on c language